<html>
<head><meta charset="utf-8"><title>Were there known soundness fixes in 1.35? · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html">Were there known soundness fixes in 1.35?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="208418097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208418097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208418097">(Aug 29 2020 at 05:16)</a>:</h4>
<p>I was about to file a stable-to-stable (1.34-to-1.35) regression bug (&lt;<a href="https://rust.godbolt.org/z/f9n6h8">https://rust.godbolt.org/z/f9n6h8</a>&gt;), but realized that my code had actually been wrong the whole time.</p>
<p>Should I still file something?  It kinda feels like it's not worth mentioning if it's 15-months old, but the release notes didn't mention any soundness fixes so it's unclear to me whether it was a known change...</p>



<a name="208420713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208420713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208420713">(Aug 29 2020 at 06:49)</a>:</h4>
<p>The purpose would be to retroactively document it in the release notes?</p>



<a name="208426866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208426866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208426866">(Aug 29 2020 at 10:09)</a>:</h4>
<p>I'm not sure.  I guess if it's just a borrowck fix then it's not worth doing anything.  But if it's an accidental change to temporarily lifetimes I'd be more scared about it.  (Either one could explain the difference, since I'm unsure exactly how long the temporary pointee of <code>&amp;mut foo()</code> is supposed to live.)</p>



<a name="208430127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208430127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208430127">(Aug 29 2020 at 11:54)</a>:</h4>
<p><span class="user-mention" data-user-id="125270">@scottmcm</span> I think documenting it in release notes would be good.</p>
<p>Isn't 1.35 the MIR borrow check release though? Or is that 1.36? I feel like it was around there</p>



<a name="208430149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208430149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208430149">(Aug 29 2020 at 11:55)</a>:</h4>
<p>Ah, it is indeed 1.36</p>



<a name="208448433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208448433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208448433">(Aug 29 2020 at 18:54)</a>:</h4>
<p>TBH I do not understand why this code is rejected? these are raw pointers it is talking about, no?</p>



<a name="208448470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208448470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208448470">(Aug 29 2020 at 18:55)</a>:</h4>
<p>oh wait, there's a <code>*</code>missing</p>



<a name="208448477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208448477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208448477">(Aug 29 2020 at 18:55)</a>:</h4>
<p>(too much type inference^^)</p>



<a name="208448498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208448498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208448498">(Aug 29 2020 at 18:55)</a>:</h4>
<p>but then this just borrows the returned temporary so this doesnt seem like a soundness fix to me?</p>



<a name="208530478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208530478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208530478">(Aug 31 2020 at 08:12)</a>:</h4>
<p>I just filed <a href="https://github.com/rust-lang/rust/issues/76147">https://github.com/rust-lang/rust/issues/76147</a> , whatever we should be doing about it.</p>



<a name="208530670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208530670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208530670">(Aug 31 2020 at 08:14)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> The <a href="https://doc.rust-lang.org/std/primitive.slice.html#method.get_unchecked_mut">returned</a> temporary is a <code>&amp;mut</code> lifetime-tied to <code>self.0</code>, though, right?  So I shouldn't be able to use <code>get_unchecked_mut</code> again?  (AFAICT it'd be allowed if I was <code>offset</code> the same pointer, but it's not ok here because the method deals in <code>&amp;mut</code>?)</p>



<a name="208530765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208530765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208530765">(Aug 31 2020 at 08:16)</a>:</h4>
<p>why would it be tied to <code>self.0</code> in any way?</p>



<a name="208530780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208530780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208530780">(Aug 31 2020 at 08:17)</a>:</h4>
<p>oh wait it doesnt return a raw pointer, but a reference. with a lifetime.</p>



<a name="208530785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208530785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208530785">(Aug 31 2020 at 08:17)</a>:</h4>
<p>somehow I thought it would return a raw pointer</p>



<a name="208530984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208530984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208530984">(Aug 31 2020 at 08:20)</a>:</h4>
<p>hm, going over the git log, nothing sticks out as a soundness fix related to associated types</p>



<a name="208531591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208531591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208531591">(Aug 31 2020 at 08:28)</a>:</h4>
<p>it looks like a change to how coercions to rawpointers work...</p>



<a name="208531603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208531603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208531603">(Aug 31 2020 at 08:29)</a>:</h4>
<p>i would expect this to be a soundness fix</p>



<a name="208532331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208532331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208532331">(Aug 31 2020 at 08:38)</a>:</h4>
<p>can someone from <span class="user-group-mention" data-user-group-id="491">@WG-nll</span> take a look at <a href="https://github.com/rust-lang/rust/issues/76147">#76147</a>?</p>



<a name="208538481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Were%20there%20known%20soundness%20fixes%20in%201.35%3F/near/208538481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Were.20there.20known.20soundness.20fixes.20in.201.2E35.3F.html#208538481">(Aug 31 2020 at 09:56)</a>:</h4>
<p>I was about to mention <a href="https://github.com/rust-lang/rust/issues/58673">#58673</a> but Matthew already beat me to it (and <a href="https://github.com/rust-lang/rust/issues/60927">#60927</a> mentions whether this needed documenting in the release blog post or relnotes, and a decision not to do so)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>